package com.mtw.bbs.common.core.enums;

public enum ResultCode {


    SUCCESS("000000","处理成功"),
    PARAM_ERROR("100002","参数错误"),


    SERVICE_EXP("100001","服务异常"),


    NO_AUTH("200000","未登录"),
    AUTH_ERROR("200001","权限异常"),
    AUTH_EXP_ERROR("200002","token过期"),
    NO_AUTH_RESOURCE("200003","无访问权限"),



    SYSTEM_ERROR("-1", "系统异常"),
    SYSTEM_BUSY("000001", "系统繁忙,请稍候再试"),

    GATEWAY_NOT_FOUND_SERVICE("010404", "服务未找到"),
    GATEWAY_ERROR("010500", "网关异常"),
    GATEWAY_CONNECT_TIME_OUT("010002", "网关超时"),

    ARGUMENT_NOT_VALID("020000", "请求参数校验不通过"),
    INVALID_TOKEN("020001", "无效token"),
    UPLOAD_FILE_SIZE_LIMIT("020010", "上传文件大小超过限制"),

    DUPLICATE_PRIMARY_KEY("030000","唯一键冲突");


    /**
     * 错误类型码
     */
    private String code;
    /**
     * 错误类型描述信息
     */
    private String msg;

    ResultCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public String getCode(){
        return code;
    }

    public String getMsg(){
        return msg;
    }


}
